<template>
  <div class="footer" :style="'background-color:' + data.color.bg">
    <div class="footer_l" :style="'color:' + data.color.text">
      <div v-for="(item, i) in data.list" :key="i">
        <i :style="'color:' + data.color.icon" :class="item.icon"></i>
        <span>{{ item.text }}</span>
        <i v-if="item.linkdata.id == 5" class="badge" :style="'background-color:' + data.color.badge">3</i>
      </div>
    </div>
    <div class="foot_btns">
      <div :style="'background-color:' + data.color.btn_l" v-if="data.btnlist[0].show">
        <span>{{ data.btnlist[0].text }}</span>
      </div>
      <div :style="'background-color:' + data.color.btn_r" v-if="data.btnlist[1].show">
        <span>{{ data.btnlist[1].text }}</span>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    data: {
      type: Object,
      default: {}
    }
  }
};
</script>

<style lang="scss" scoped>
.footer {
  display: flex;
  align-items: center;
  background: #fff;
  height: 48px;
  padding: 6px;
  .footer_l {
    display: flex;
    align-items: center;
    height: 100%;
    div {
      width: 54px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: space-between;
      height: 100%;
      position: relative;
      .iconfont {
        font-size: 18px;
        margin: 0 auto;
        text-align: center;
        height: 18px;
        width: 18px;
        line-height: 18px;
        font-style: normal;
      }
      .badge {
        box-sizing: border-box;
        font-size: 8px;
        position: absolute;
        height: 12px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-align: center;
        min-width: 12px;
        border-radius: 11px;
        font-weight: bold;
        color: #fff;
        transform: translate(-50%, 0);
        left: 65%;
        top: -3px;
        padding: 0;
        font-style: normal;
        padding: 0 3px;
      }
      span {
        font-size: 10px;
        line-height: 10px;
        margin: 0 auto 2px;
        text-align: center;
      }
    }
  }
  .foot_btns {
    display: flex;
    flex: 1;
    height: 100%;
    flex-wrap: nowrap;
    justify-content: center;
    color: #fff;
    min-width: 202px;
    margin: 0 !important;
    overflow: hidden;
    border-radius: 34px;
    div {
      flex: 1;
      display: flex;
      font-size: 14px;
      text-align: center;
      flex: 1;
      height: 100%;
      min-width: 101px;
      margin: 0;
      line-height: 14px;
      flex-direction: column;
      justify-content: center;
      background: rgb(255, 60, 41);
    }
  }
}
</style>
